package collectionDemo.mSet;

import utils.PrintUtil;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

/**
 * @Author: Jie
 * @Date: 2019/5/19 15:05
 * @Function :
 */
public class MHashSet {
    public static void main(String[] args) {
        Set<Long> mhashSet = new HashSet<>();
        for (int i = 0; i < 1000; i++) {
            mhashSet.add(Long.valueOf(i));
        }
        Iterator<Long> iterator = mhashSet.iterator();
        while (iterator.hasNext()){
            if (iterator.next()%3==0){
                iterator.remove();
            }
        }
        PrintUtil.print(mhashSet);

    }
}
